Merged
Conversation
영수증 수정할 경우에도 적용, 영수증 조회 시에 boolean 값으로 반환
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new receipt amount validation logic by comparing the receipt’s total price with the sum of its items, and reflects the result through the new isAmountMatched field.
- Added the isAmountMatched field to the Receipt domain, mapper, and response DTOs.
- Implemented a check in ReceiptEditor to verify the amount match and updated both create and update services accordingly.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/ClubAccount_BE/receipt/mapper/ReceiptMapper.java | Added mapping for the new isAmountMatched field. |
| src/main/java/com/ClubAccount_BE/receipt/domain/service/ReceiptEditor.java | Introduced checkAmountMatch method to validate receipt amounts. |
| src/main/java/com/ClubAccount_BE/receipt/domain/Receipt.java | Extended the domain model with the isAmountMatched field and its setter. |
| src/main/java/com/ClubAccount_BE/receipt/application/service/UpdateReceiptService.java | Updated receipt amount verification logic in the update flow. |
| src/main/java/com/ClubAccount_BE/receipt/application/service/CreateReceiptService.java | Updated receipt amount verification logic in the create flow. |
| src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptResponse.java | Updated DTO to include the isAmountMatched field. |
| src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptDetailResponse.java | Updated detailed DTO to include the isAmountMatched field. |
Comments suppressed due to low confidence (1)
src/main/java/com/ClubAccount_BE/receipt/domain/Receipt.java:90
- [nitpick] The method name 'checkAmountMatched' is used to set the match status, which could be misleading. Consider renaming it to 'setAmountMatched' for better clarity.
public void checkAmountMatched(boolean isAmountMatched) {
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
tiemo0708
reviewed
May 11, 2025
src/main/java/com/ClubAccount_BE/receipt/application/service/CreateReceiptService.java
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



📌 작업 개요
✅ 작업 내용
📂 리뷰 요구사항